package com.zhaodi.mybatisflexdemo.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.Data;
import lombok.experimental.Delegate;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;

/**
 * 
 * @TableName tb_sys_permission
 */
@FieldNameConstants
@Data
@Table("tb_sys_permission")
public class TbSysPermission implements Serializable {
    /**
     * id
     */
    @Id(keyType = KeyType.Generator,value = KeyGenerators.snowFlakeId)
    private Integer id;

    /**
     * 权限名称
     */
    private String name;

    /**
     * 权限类型：1目录 2菜单 3按钮
     */
    private String type;

    /**
     * 访问地址
     */
    private String url;

    /**
     * 权限代码
     */
    private String percode;

    /**
     * 父节点ID
     */
    private Integer parentId;

    /**
     * 显示顺序
     */
    private Integer sort;

    /**
     * 是否删除：0正常1删除
     */
    @Column(isLogicDelete = true)
    private String state;

    private static final long serialVersionUID = 1L;
}